package com.craney.aboutDispatcher
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	public class InterfaceDispatcher implements IEventDispatcher
	{
		private var disp:EventDispatcher = new EventDispatcher();
		
		
		public function InterfaceDispatcher()
		{
		}
		
		public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void
		{
			disp.addEventListener(type, listener, useCapture, priority, useWeakReference);
		}
		
		public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void
		{
			disp.removeEventListener(type, listener, useCapture);
		}
	
		public function hasEventListener(type:String):Boolean
		{
			return disp.hasEventListener(type);
		}
			
		public function willTrigger(type:String):Boolean
		{
			return disp.willTrigger(type);
		}
		
		public function dispatchEvent(event:Event):Boolean
		{
			if(event is NewEvent)
			{
				var ne:NewEvent = event as NewEvent;
				ne.myTarget = this;
			}
			return disp.dispatchEvent(event);
		}
		
		
	}
}